package com.ruan.controller;

import com.ruan.pojo.Address;
import com.ruan.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName:AddressController
 * @Author:阮昇
 * @Description:
 * @Datetime: 2023/6/19 19:28
 **/
@RestController
@RequestMapping("/address")
public class AddressController {

    @Autowired
    private AddressService addressService;

    @RequestMapping("/getAddressById/{id}")
    public Address getAddressById(@PathVariable Integer id){

        return addressService.getAddressById(id);

    }
}
